﻿using Orchard.Mvc.Routes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Autohome.Login
{
    public class Routes : IRouteProvider
    {
        public void GetRoutes(ICollection<RouteDescriptor> routes)
        {
            foreach (var routeDescriptor in GetRoutes())
            {
                routes.Add(routeDescriptor);
            }
        }

        public IEnumerable<RouteDescriptor> GetRoutes()
        {
            return new[]{
            new RouteDescriptor{
               Route = new Route(
                 "Login/Add",
                 new RouteValueDictionary{
                    {"area","Antohome.Login"},
                    {"controller","Login"},
                    {"action","Add"}
                 },
                 new RouteValueDictionary(),
                 new RouteValueDictionary{
                    {"area","Antohome.Login"}
                 },
                 new MvcRouteHandler())
             }
           };
        }
    }
}